/** 
Copyright (c) 2010, Sheikh Abdul Wahid Ahmed
Details @ http://extremecodeworld.codeplex.com/license
**/

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using EXtremecode.Utils;
using EXtremecode.PresentationLayer; 

public partial class PopupMasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlLink calendarStyleSheetLink = new HtmlLink();
        calendarStyleSheetLink.Attributes.Add("type", "text/css");
        calendarStyleSheetLink.Attributes.Add("rel", "stylesheet");
        calendarStyleSheetLink.Attributes.Add("href", "~/calendar/calendar-blue.css");
        calendarStyleSheetLink.ID = "calendarStyleSheetLink";
        Page.Header.Controls.Add(calendarStyleSheetLink);

        
        Page.ClientScript.RegisterClientScriptInclude("NumberFormatJavaScript", ResolveClientUrl("~/js/NumberFormat.js"));
        Page.ClientScript.RegisterClientScriptInclude("CommonJavaScript", ResolveClientUrl("~/js/common.js"));
        Page.ClientScript.RegisterClientScriptBlock(typeof(string), "DATE_FORMAT",
            string.Format("var DATE_FORMAT = '{0}';", DateUtil.DateFormat), true);


        //--for confirmation dialog
        Page.ClientScript.RegisterClientScriptBlock(typeof(string), "CONFIRMATION_DISPLAY",
            string.Format("var CONFIRMATION_DISPLAY = false;"), true);
        Page.ClientScript.RegisterClientScriptBlock(typeof(string), "CONFIRMATION_MESSAGE",
            string.Format("var CONFIRMATION_MESSAGE = '{0}';",
            ResourceProvider.GetGeneralResourceString("Message_Confirmation")), true);
        Page.Form.Attributes.Add("onsubmit", "if(CONFIRMATION_DISPLAY){CONFIRMATION_DISPLAY=false; return confirm(CONFIRMATION_MESSAGE)};");



        Page.ClientScript.RegisterClientScriptBlock(typeof(string), "MESSAGE_NO_ROW_SELECTED",
               string.Format("var MESSAGE_NO_ROW_SELECTED = '{0}';",
                ResourceProvider.GetGeneralResourceString("Message_NoRow_Selected")), true);


    }
    
}
